﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
	class Program
	{
		static void Main(string[] args)
		{
			while (true)
			{
				Console.Write("Insert min value: ");
				int min;
				bool minsuccess = int.TryParse(Console.ReadLine(), out min);
				if (minsuccess == false)
				{
					Console.WriteLine("Please, enter valid number!");
				}
				else
				{
					Console.Write("Insert max value: ");
					int max;
					bool maxsuccess = int.TryParse(Console.ReadLine(), out max);
					if (maxsuccess == false)
					{
						Console.WriteLine("Please, enter valid number!");
					}
					else
					if (max > min)
					{
						Console.Write("Insert a value for checking: ");
						int insertedvalue = int.Parse(Console.ReadLine());
						Console.Write("Result:");
						if (insertedvalue > min && insertedvalue < max)
						{
							Console.WriteLine("Value In Range");
						}
						if (insertedvalue == min)
						{
							Console.WriteLine("Value belongs to min value");
						}
						if (insertedvalue == max)
						{
							Console.WriteLine("Value belongs to max value");
						}
						if (insertedvalue < min)
						{
							Console.WriteLine("Value is less than min value");
						}
						if (insertedvalue > max)
						{
							Console.WriteLine("Value is bigger than max value");
						}
					}
					else
					{
						Console.WriteLine("Max value should be bigger than min");
					}

					Console.ReadLine();
				}
			}
		}
	}
}


